﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="AddDocument.aspx.cs" Inherits="AddDocument" MaintainScrollPositionOnPostback="true" %>

<asp:content id="Content1" contentplaceholderid="HeadContent" runat="Server">
    <asp:Panel ID="AuthenticatedHeaderPanel" runat="server">
        <ul id="user">
            <li>
                <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="Redirect" LogoutPageUrl="~/Login.aspx" />
            </li>
        </ul>

        <div id="header-inner">
            <div class="textt">
            <h4>
                <asp:Label runat="server" ID="WelcomeBackMessage"></asp:Label>
                <asp:label id="lblMessage" runat="server" enableviewstate="false" />
            </h4>
            </div>
        </div>
    </asp:Panel>
</asp:content>

<asp:content id="Content2" contentplaceholderid="Menu" runat="Server">
<div id="left">
<div id = "navigation">
    <asp:Panel runat="server" ID="AuthenticatedMenuPanel" Width="200px">
        <div id="menu-header">
            <div class="menutext">
                <asp:Label ID="Label1" runat="server" Text="Menu"/>
            </div> 
        </div>
          <asp:Menu ID="Menu1" runat="server" StaticDisplayLevels="3" BackColor="White" DynamicHoverStyle-BorderStyle="NotSet" Width="200px">
              <Items>
                
                <asp:MenuItem Text="Home" Value="Home" navigateurl="Default.aspx">
                  <asp:MenuItem Text="New Document" Value="New Document" navigateurl="AddDocument.aspx">                   
                   </asp:MenuItem>
                </asp:MenuItem>

                <asp:MenuItem Text="Users" Value="My_Users" navigateurl="MyUsers.aspx">
                  <asp:MenuItem Text="New User" Value="New_User" navigateurl="AddUser.aspx">
                   </asp:MenuItem>
                </asp:MenuItem>
               
                <asp:MenuItem Text="Companies" Value="Companies" navigateurl="MyCompanies.aspx">
                  <asp:MenuItem Text="New Company" Value="New_Company" navigateurl="AddCompany.aspx">
                   </asp:MenuItem>
                </asp:MenuItem>
                
                <asp:MenuItem Text="Clients" Value="Clients" navigateurl="MyClients.aspx">
                  <asp:MenuItem Text="New Client" Value="New_Client" navigateurl="AddClient.aspx">
                   </asp:MenuItem>
                </asp:MenuItem>

              </Items>
          </asp:Menu>
     </asp:Panel>
  </div>
</div>
</asp:content>

<asp:content id="Content3" runat="server" contentplaceholderid="MainContent">
  <div id= "right"> 
    <asp:Panel runat="server" ID="AuthenticatedMessagePanel">
        <div class="box">
            <div class ="title">
                <h6>
                    <asp:Label ID="Label5" runat="server" Text="Add new document"/>
                </h6>
            </div>
        <div class="lists">
         <table id="tab">
                <tbody>
                    <tr>
                        <th class="text">User:</th>
                        <td colspan="3">
                            <asp:Label ID="lbl_user_id" runat="server" Text=" " Visible="false"></asp:Label>
                            <asp:Label ID="lbl_user" runat="server" Text=" "></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th class="text">Document type:</th>
                        <td colspan="3">
                            <asp:DropDownList ID="Drop_doc_type" runat="server" AutoPostBack="True" onselectedindexchanged="Drop_doc_type_SelectedIndexChanged" InitialValue="--Select--"></asp:DropDownList>
                            <asp:RequiredFieldValidator ID="doc_type_Validator" runat="server" ControlToValidate="Drop_doc_type" ErrorMessage="<div>Document type cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th class="text">Document number:</th>
                        <td colspan="3">
                            <asp:TextBox Enabled="False" BorderStyle="None" BackColor="#FFFFFF" ID="tb_doc_number" runat="server" Font-Bold="True" ></asp:TextBox>
                            <asp:RequiredFieldValidator ID="doc_number_Validator" runat="server" ControlToValidate="tb_doc_number" ErrorMessage="<div>Document number cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th class="text">Document date:</th>
                        <td colspan="3">
                            <asp:TextBox ID="tb_doc_date" runat="server"></asp:TextBox>
                            <asp:Image ID="Image1" runat="server" ImageUrl="Images/date_picker.png" />
                            <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="tb_doc_date" PopupButtonID="Image1" Format="yyyy.MM.dd"></ajaxToolkit:CalendarExtender>
                            <asp:RequiredFieldValidator ID="doc_date_Validator" runat="server" ControlToValidate="tb_doc_date" ErrorMessage="<div>Document date cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th class="text">Document payment date:</th>
                        <td colspan="3">
                            <asp:TextBox ID="tb_doc_pay_date" runat="server"></asp:TextBox>
                            <asp:Image ID="Image2" runat="server" ImageUrl="Images/date_picker.png" />
                            <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="tb_doc_pay_date" PopupButtonID="Image2" Format="yyyy.MM.dd"></ajaxToolkit:CalendarExtender>
                            <asp:RequiredFieldValidator ID="doc_pay_date_Validator" runat="server" ControlToValidate="tb_doc_pay_date" ErrorMessage="<div>Document payment date cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th class="text">Company from:</th>
                        <td colspan="3">
                            <asp:DropDownList ID="Drop_company_from" runat="server" AutoPostBack="True" onselectedindexchanged="Drop_company_from_SelectedIndexChanged1" ></asp:DropDownList>
                            <asp:RequiredFieldValidator ID="company_from_Validator" runat="server" ControlToValidate="Drop_company_from" ErrorMessage="<div>Company cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th rowspan="3" class="text"></th>
                        <th class="text">Company address:</th>
                        <td colspan="2">
                            <asp:DropDownList ID="Drop_address_company_from" runat="server" ></asp:DropDownList>
                            <asp:RequiredFieldValidator ID="Drop_address_company_from_Validator" runat="server" ControlToValidate="Drop_ADDRESS_company_from" ErrorMessage="<div>Company address cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th rowspan="2" class="text">Bank & Account nr.:</th>
                            <th class="text">Bank:</th>
                                <td>
                                    <asp:DropDownList ID="Drop_BANK_company_from" runat="server" AutoPostBack="True" onselectedindexchanged="Drop_BANK_company_from_SelectedIndexChanged" ></asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="Drop_BANK_company_from_Validator" runat="server" ControlToValidate="Drop_BANK_company_from" ErrorMessage="<div>Company bank cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                                </td>
                    </tr>
                    <tr>
                            <th class="text">Account: </th>
                                <td>
                                    <asp:DropDownList ID="Drop_ACCOUNT_company_from" runat="server"></asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="Drop_account_company_from_Validator" runat="server" ControlToValidate="Drop_ACCOUNT_company_from" ErrorMessage="<div>Bank account cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                                </td>
                    </tr>
                    <tr>
                        <th class="text">Client to:</th>
                        <td colspan="3">
                            <asp:DropDownList ID="Drop_client_to" runat="server" AutoPostBack="True" onselectedindexchanged="Drop_client_to_SelectedIndexChanged"></asp:DropDownList>
                            <asp:RequiredFieldValidator ID="client_to_Validator" runat="server" ControlToValidate="Drop_client_to" ErrorMessage="<div>Client cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th rowspan="3" class="text" ></th>
                        <th class="text">Client address:</th>
                        <td colspan="2">
                            <asp:DropDownList ID="Drop_address_client_to" runat="server"></asp:DropDownList>
                            <asp:RequiredFieldValidator ID="address_client_to_Validator" runat="server" ControlToValidate="Drop_ADDRESS_client_to" ErrorMessage="<div>Client address cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th rowspan="2" class="text">Bank & Account nr.:</th>
                           <th class="text">Bank:</th>
                              <td>
                                 <asp:DropDownList ID="Drop_BANK_client_to" runat="server" AutoPostBack="True" onselectedindexchanged="Drop_BANK_client_to_SelectedIndexChanged" ></asp:DropDownList>
                                 <asp:RequiredFieldValidator ID="Drop_BANK_client_to_Validator" runat="server" ControlToValidate="Drop_BANK_client_to" ErrorMessage="<div>Client bank cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                              </td>
                    </tr>
                    <tr>
                           <th class="text">Account: </th>
                              <td>
                                 <asp:DropDownList ID="Drop_ACCOUNT_client_to" runat="server"></asp:DropDownList>
                                 <asp:RequiredFieldValidator ID="Drop_ACCOUNT_client_to_Validator" runat="server" ControlToValidate="Drop_ACCOUNT_client_to" ErrorMessage="<div>Bank account cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                              </td>
                    </tr>
                    <tr>
                        <th class="text">Payment type:</th>
                        <td colspan="3">
                            <asp:DropDownList ID="Drop_pay_type" runat="server"></asp:DropDownList>
                            <asp:RequiredFieldValidator ID="pay_type_Validator" runat="server" ControlToValidate="Drop_pay_type" ErrorMessage="<div>Payment type cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add" InitialValue="--Select--"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th class="text">Place of delivery:</th>
                        <td colspan="3">
                            <asp:TextBox ID="tb_delivery_place" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="delivery_place_Validator1" runat="server" ControlToValidate="tb_delivery_place" ErrorMessage="<div>Delivery place cannot be blank.</div>" SetFocusOnError="true" Display="Dynamic" ValidationGroup="add"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th class="buttons"></th>
                        <td colspan="3" class="buttons">
                            <div class="button">
                                <ul id="confirm">
                                    <li>
                                        <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" CommandName="Cancel" onclick="CancelButton_Click" Text="Cancel" Width="60px"></asp:LinkButton>
                                    </li>
                                    <li>
                                        <asp:LinkButton ID="AddButton" runat="server" CommandName="Add" onclick="AddButton_Click" Text="Add" ValidationGroup="add" Width="60px"></asp:LinkButton>
                                    </li>
                                </ul>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        <asp:ScriptManager ID="ScriptManager1" runat="server"/>
      </div>
    </div>
    </asp:Panel>
</div>
</asp:content>

